<?php
namespace Admin\Model;
use Think\Model\RelationModel;
/**
* Description:
* @Author: Tudo<997470395@qq.com>
* @Created: 2015-2-4 上午10:45:32
*/
class AdminModel extends RelationModel
{  
	
	protected $_link =array(
			'Role' => array(
					'mapping_type'      =>  self::MANY_TO_MANY,
					//'class_name'        =>  'Role',
			     	'mapping_name'      =>  'role',
					'foreign_key'       =>  'user_id',
					//'condition'=>'1=1',
					'relation_foreign_key'  =>'role_id',
					'relation_table'    =>  'rbac_role_user',//此处应显式定义中间表名称，且不能使用C函数读取表前缀
					'mapping_fields' => 'id,name',
			)
	);
	
}